$def with(acts, offset, limit, at, user, pagesp)
$var title: 活动
$var gmap: 0

<h1>活动列表</h1>
<div class="left_side">
    $if at == "wish":
        <h2> $user['name']感兴趣的活动 </h2>
    $if at == "do":
        <h2> $user['name']参加的活动 </h2>
    $if at == "own":
        <h2> $user['name']发起的活动 </h2>
    $if at == "all":
        <h2> 最新活动 </h2>
    <ul>
    $for act in acts:
        <li class="act"><a href="/activity?aid=$act['id']"> $act['subject']</a> 在 $act['gatherlocation'] 于 $act['gathertime'] 进行</li>
    </ul>
    <div class="split">
        <a href="/acts?uid=$user['uid']&act=$at&offset=0">起始页</a>
        $if pagesp['more_front']:
            <a href="/acts?uid=$user['uid']&act=$at&offset=$((int(pagesp['start_page'])-1)*int(limit))">更多</a>
        $for i in range(pagesp['start_page'], pagesp['end_page']):
            <a href="/acts?uid=$user['uid']&act=$at&offset=$(int(i) * int(limit))">$(int(i)+1)</a>
        $if pagesp['more_end']:
            <a href="/acts?uid=$user['uid']&act=$at&offset=$((int(pagesp['end_page'])+1)*int(limit))">更多</a>
        <a href="/acts?uid=$user['uid']&act=$at&offset=$(int(pagesp['end_offset']) * int(limit))">尾页</a>
    </div>
</div>
<div class="right_side">
    <span><a href="/act_add">>我要发布活动</a></span>
    <br>
    <span ><a href="/acts?act=all&uid=$user['uid']">查看最新活动</a></span>
</div>
